<!-- 전체 DB 조회 관리자 화면 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>S-Pet Log Page-Admin Mode(v0.3)</title>
<link href="nfc.css" type="text/css" rel="stylesheet"/>
</head>
<body>
	<h1>[Admin View] 관리자 화면(전체 DB조회)</h1>
	<hr/>
	<h2>입력 이력(Tag List)</h2>
	<h4><a href="/">Main</a></h4>
	<table border="1">
	<tr>
		<th>No.</th>
		<th>Primary Key</th>
		<th>[쿼리]</th>
	</tr>
	<% if(data.length==0){ %>
	<tr>
		<td colspan="3" align="center">기록이 없습니다.</td>
	</tr>
	<% }else{
		for(var i=0; i < data.length ; i++){ %>
	<tr>
		<td><%= i+1 %></td>
	<% if(data[i].qs==undefined){ %>
		<td><%= data[i].pid %></td>
	<% }else{ %>
		<td><a href="/view?i=<%= data[i].pid %>&<%= data[i].qs %>"><%= data[i].pid %></a></td>
	<% }%>
		<td><%= data[i].qs %></td>
	</tr>
	<% }
	} %>
	</table>
	
	<h1>DB 확인</h1>
	<table border="1">
	<tr>
		<th>No.</th>
		<th>Primary Key</th>
		<th>주인이름</th>
		<th>동물이름</th>
		<th>전화번호</th>
		<th>특징</th>
		<th>사례금</th>
		<th>실종여부</th>
	</tr>
	<% if(data.length==0){ %>
	<tr>
		<td colspan="8" align="center">내용 없음</td>
	</tr>
	<% }else{
		for(var i=0; i < data.length ; i++){ %>
	<tr>
		<td><a href="/log/del?i=<%= data[i].pid %>"><%= i+1 %></a></td>
	<% if(data[i].qs==undefined){ %>
		<td><%= data[i].pid %></td>
	<% }else{ %>
		<td><a href="/view?i=<%= data[i].pid %>&<%= data[i].qs %>"><%= data[i].pid %></a></td>
	<% }%>
		<td><%= data[i].owner %></td>
		<td><%= data[i].name %></td>
		<td><%= data[i].tel %></td>
		<td><%= data[i].memo %></td>
		<td><%= data[i].cash %>만원</td>
		<td><%= data[i].sos %></td>
	</tr>
	<% }
	} %>
	</table>

	<hr/>

	<h1>백업</h1>
	<table border="1">
	<tr>
		<th>No.</th>
		<th>Primary Key</th>
		<th>주인이름</th>
		<th>동물이름</th>
		<th>전화번호</th>
		<th>특징</th>
		<th>사례금</th>
		<th>실종여부</th>
		<th>[쿼리]</th>
	</tr>
	<% if(data.length==0){ %>
	<tr>
		<td colspan="9" align="center">내용 없음</td>
	</tr>
	<% }else{
		for(var i=0; i < data.length ; i++){ %>
	<tr>
		<td><%= i+1 %></td>
		<td><a href="/view?i=<%= data[i].pid %>&<%= data[i].qs %>"><%= data[i].pid %></a></td>
		<td><%= data[i].owner %></td>
		<td><%= data[i].name %></td>
		<td><%= data[i].tel %></td>
		<td><%= data[i].memo %></td>
		<td><%= data[i].cash %>만원</td>
		<td><%= data[i].sos %></td>
		<td><%= data[i].qs %></td>
	</tr>
	<% }
	} %>
	</table>

<!--	<h4><a href="/log/clear">[전체 삭제]</a></h4> -->
</body>
</html>